function Dialog(t,url,w,h){
	var title = t;
	var strFile= url;
	var nWidth= parseInt(w)>0?w:"500";
	var nHeight=parseInt(h)>0?w:"250";
	return window.showModalDialog(strFile,window,"dialogWidth:" + nWidth + "px;dialogHeight:" + nHeight + "px;center:yes;status:no;scroll:no;help:no;");
}
function JumpToPage(obj,url,maxPage){
	if(obj.value == ""){
		location.href = url + "&p=1";
		return true;
	}
	if(parseInt(obj.value)<=maxPage){
		location.href = url + "&p="+parseInt(obj.value);
	}else{
		location.href = url + "&p="+maxPage;
	}
}
String.prototype.InStr = function(str){
	if(str==null){
		str = "";
	}
	return this.indexOf(str);
}
String.prototype.Trim = function(){
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
